module.exports = function($scope, $stateParams, $state, $modal, $modalInstance,FileUploader,userid,toaster,$resource){  
    // var userid = $stateParams.userid;
    console.log(userid);
    $scope.salelists = [];
    $scope.info = {
        'user_id' : userid,
        'transmitIntegral' : '',
        'type' : ''
    }

    
    $scope.ok = function(){
        $scope.info.transmitIntegral = parseInt($scope.info.transmitIntegral);
        $resource('/api/ac/cc/coinintegral/saveRechargeIntegral', {}, {}).save($scope.info,function(res){
            console.log($scope.info);
            if(res.errcode != 0){
                toaster.success({title:"",body:res.errmsg});
                return;
            }
            console.log(res);
            alert('充值成功');
            $modalInstance.close();

        })
    }

    $scope.cancel = function () {
        $modalInstance.dismiss('cancel');
    };

    $scope.seepicture = function(){
        
    }
};